<!--
 * @Author: huangpx
 * @Date: 2023-03-11 20:17:01
 * @LastEditors: huangpx
 * @LastEditTime: 2023-04-25 15:19:49
 * @Description: file content
-->
<template>
    <div style="
        background:#fff;
        width:100%;
        height:100%;
        display: flex;
        justify-content: center;
        align-items: center;"> 
        <pro-asyn-tree-transfer
          lazy
         :propsData="propsData"
         :request="request"
         :reponse="reponse"
         :openPage="false"
         :checkStrictly="true"
        />
    </div>
</template>
<script>
export default {
    data(){
        return{
            propsData:{
                label: 'districtName',
                key: 'districtId',
                parentKey: 'parentId',
                disabled: 'disabled',
                children: 'children',
                isCheck: 'isCheck',
                level: 'levels'
            },
            request: {
                nodeId: "parentId",
                url: "/shareDeviceUrl",
                childUrl: "/childDeviceUrl",
                res: {
                    parentId: 0
                },
                req: "data",
                headers: params => {
                //头部增加签名
                let config = {
                   token: sessionStorage.getItem("token"),
                       ...params
                };
                return config.headers;
                }
            },
            reponse: {
                data:res => {
                    return   new Promise(reslove=>{
                    reslove(res)
                  })}  
            }
        }
    }
}
</script>